<template>
  <div class="demo-title">image-picker/demo4</div>
  <div class="image-picker-demo">
    <ImagePicker v-model:file-list="fileList" url="https://xxxx" :maximum="5" multiple :maximize="1024 * 50" @oversize="onOversize" />
  </div>
</template>

<script lang="ts" setup>
  import { ref } from 'vue'
  import ImagePicker from '@sscd-mobile/image-picker'
  import { type FileItem } from '@sscd-mobile/image-picker'
  import Toast from '@sscd-mobile/toast'
  const fileList = ref<FileItem[]>([])
  const onOversize = () => Toast.show({text: '文件大小不能超过 50kb'});
</script>

<style lang="less" scoped>
  .image-picker-demo {
    background-color: #fff;
    padding: 12px;
  }
</style>
